home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11085 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  745 b 

  1. Path: connix.com!news
  2. From: Scott Hawley <shawley@connix.com>
  3. Newsgroups: comp.lang.misc,comp.lang.c,comp.lang.pl1,comp.lang.apl
  4. Subject: Re: GOTO controversy
  5. Date: Thu, 21 Mar 1996 11:56:47 -0800
  6. Organization: SHAWLEY SYSTEMS
  7. Message-ID: <3151B47F.70FD@connix.com>
  8. References: <314FB5F5.259B@simi.is>
  9. NNTP-Posting-Host: shawley.connix.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win16; I)
  14.  
  15. What to you think? Loops without using loops?
  16.  
  17. a loop:
  18.  
  19. for(i=0;i<10;i++)
  20. {
  21.   stuff
  22. }
  23.  
  24. Looping with out a loop
  25.  
  26. no_loop(0,10);
  27.  
  28. no_loop(int start, int end)
  29. {
  30.     if(start != end) {
  31.         stuff
  32.         no_loop(start+1,end);
  33.     }
  34. }
  35.  
  36. I haven't tested this but you get the idea.
  37.